import { axios } from "./axios"

/* 获取seo配置 */
export const getSeoConfig = () => {
    return axios({
        url: '/api/getSeoConfig',
        method: 'get'
    })
}

/* 获取注册地区 */
export const getAreaList = () => {
    return axios({
        url: '/api/getAreaList',
        method: 'get'
    })
}

/* 用户注册 */
export const userRegister = (data: any) => {
    return axios({
        url: '/api/register',
        data,
        method: 'post'
    })
}

/* 用户登录 */
export const userLogin = (data: any) => {
    return axios({
        url: '/api/login',
        data,
        method: 'post'
    })
}

/* 获取用户信息 */
export const getUserInfo = (data: any) => {
    return axios({
        url: '/api/getUserInfo',
        data,
        method: 'get'
    })
}

/* 用户退出登录 */
export const logout = (data: any) => {
    return axios({
        url: '/api/logout',
        data,
        method: 'get'
    })
}

/* 用户修改密码 */
export const updatePassword = (data: any) => {
    return axios({
        url: '/api/updatePassword',
        data,
        method: 'post'
    })
}

/* 用户保存修改信息 */
export const saveUserInfo = (data: any) => {
    return axios({
        url: '/api/saveUserInfo',
        data,
        method: 'post'
    })
}

/* 上传文件 */
export const upload = (data: any) => {
    return axios({
        url: '/api/upload',
        data,
        method: 'post'
    })
}

/* 关注产品 */
export const followProducts = (data: any) => {
    return axios({
        url: '/api/followProducts',
        data,
        method: 'post'
    })
}

/* 取消关注产品 */
export const cancelFollow = (data: any) => {
    return axios({
        url: '/api/cancelFollow',
        data,
        method: 'get'
    })
}


/* 获取用户关注列表 */
export const getFollowList = (data: any) => {
    return axios({
        url: '/api/getFollowList',
        data,
        method: 'get'
    })
}

/* 获取用户浏览记录 */
export const getUserViewProductsLog = (data: any) => {
    return axios({
        url: '/api/getUserViewProductsLog',
        data,
        method: 'get'
    })
}

/* 发送邮箱验证码 */
export const sendEmailCode = (data: any) => {
    return axios({
        url: '/api/sendEmailCode',
        data,
        method: 'post'
    })
}

/* 验证邮箱验证码 */
export const checkEmailCode = (data: any) => {
    return axios({
        url: '/api/checkEmailCode',
        data,
        method: 'get'
    })
}

/** 用户订阅 */
export const userSubscribe = (data: any) => {
    return axios({
        url: '/api/subscribe',
        data,
        method: 'post'
    })
}

/* 用户咨询 */
export const consult = (data: any) => {
    return axios({
        url: '/api/consult',
        data,
        method: 'post'
    })
}

/* 忘记密码验证邮箱是否存在 */
export const userForgot = (data: any) => {
    return axios({
        url: '/api/forgotPassword',
        data,
        method: 'post'
    })
}

/* 重置密码 */
export const resetPassword = (data: any) => {
    return axios({
        url: '/api/resetPassword',
        data,
        method: 'post'
    })
}

/* 获取推送列表 */
export const getSubscribeList = (data: any) => {
    return axios({
        url: '/api/getSubscribeList',
        data,
        method: 'get'
    })
}

/* 获取推送详情 */
export const getPushContent = (data: any) => {
    return axios({
        url: '/api/getPushContent',
        data,
        method: 'get'
    })
}

/* 获取咨询列表 */
export const getConsultList = (data: any) => {
    return axios({
        url: '/api/getConsultList',
        data,
        method: 'get'
    })
}

/* 获取咨询排序标签 */
export const getConsultOrderLabel = () => {
    return axios({
        url: '/api/getConsultOrderLabel',
        method: 'get'
    })
}

/* 获取用户定制需求列表 */
export const getUserCustomizedList = (data: any) => {
    return axios({
        url: '/api/getUserCustomizedList',
        data,
        method: 'get'
    })
}